
class Identity {
  constructor({code='', name='', ref, itemCode, itemName} = {}) {
    this.code = itemCode ? `${code}.${itemCode}` : code.toString();
    this.name = itemName?.toString() ?? name.toString();
    this.ref = ref;
  }

  set({code='', name=''}={}) {
    this.code = code;
    this.name = name;
  }

  setRef(ref) {
    this.ref = ref;
  }

}

export default Identity;